<?php
namespace app\portal\controller;

use cmf\controller\HomeBaseController;

class IndexController extends HomeBaseController
{
    public function index()
    {
    	$param = $this->request->param();
        $xml = file_get_contents('php://input'); //PHP7接收
        $data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
        file_put_contents($_SERVER["DOCUMENT_ROOT"] . "/upload/flowindex.txt", json_encode($data) . PHP_EOL, FILE_APPEND);
        file_put_contents($_SERVER["DOCUMENT_ROOT"] . "/upload/flowsindex.txt", json_encode($param) . PHP_EOL, FILE_APPEND);

    	return;
        return $this->fetch(':index');
    }
}
